package com.bojin.studio.ubattery.advice;

import java.util.List;

import com.bojin.studio.ubattery.ControlManager;
import com.bojin.studio.ubattery.R;
import com.bojin.studio.ubattery.adviceInfo;

import android.content.Context;
import android.os.Handler;
import android.provider.Settings;
import android.util.Log;

public class BrightnessAdvice {
	final String tag="BrightnessAdvice";
	Context context=null;
	public BrightnessAdvice(Context mcontext)
	{
		context=mcontext;
	}
	
	public void detect(List<adviceInfo> adviceList)
	{
		ControlManager cm=new ControlManager(context);
		if(!cm.getAutoBrightnessState())
		{
			if(Settings.System.getInt(context.getContentResolver(),Settings.System.SCREEN_BRIGHTNESS,0)>180)
			{
				adviceInfo adInfo=new adviceInfo();
				adInfo.icon=context.getResources().getDrawable(R.drawable.brightness_32);
				adInfo.title=context.getResources().getString(R.string.b_control);
				adInfo.action="Switch to Auto Mode or lower brightness level to 70%";
				adInfo.reason="Brightness Level too High(>70%)";
				adInfo.content="Brightness Level too High(>70%)";
				adviceList.add(adInfo);
			}
		}
	}
	

}
